package com.itheima.stock.mapper;

import com.itheima.stock.pojo.SysUserRole;
import com.itheima.stock.vo.req.UpdateRoleInfoReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
* @author HearTheSong
* @description 针对表【sys_user_role(用户角色表)】的数据库操作Mapper
* @createDate 2022-03-13 17:42:28
* @Entity com.itheima.stock.pojo.SysUserRole
*/
@Mapper
public interface SysUserRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    SysUserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserRole record);

    int updateByPrimaryKey(SysUserRole record);
    // 删除中间表的userid的数据
    void deleteByUserId(@Param("uid") String userId);

    void inserByUserRoleIds(@Param("primaryKey") long primaryKey, @Param("uid") String userId, @Param("rid") String roleId, @Param("createTime") Date date);
    // 重新插入用户对应的角色信息

}
